Remove erroneous preconditions
authorMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2020 16:43:26 +0000 (12:43 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2020 16:43:52 +0000 (12:43 -0400)
Tests found these functions to be non-working.

gtk/gtkaccessiblevaluestatic.c

index c50610345392a4a9ce7bc8e4ee3498fdd03cee65..07600def081345f76ec8eb98e7cde3eb23cc1d1c 100644 (file)
@@ -292,8 +292,6 @@ gtk_invalid_accessible_value_parse (const char  *str,
 {
   int value;
 
-  g_return_val_if_fail (str == NULL || len == 0, NULL);
-
   if (_gtk_builder_enum_from_string (GTK_TYPE_ACCESSIBLE_INVALID_STATE, str, &value, error))
     return gtk_invalid_accessible_value_new (value);
 
@@ -352,8 +350,6 @@ gtk_autocomplete_accessible_value_parse (const char  *str,
 {
   int value;
 
-  g_return_val_if_fail (str == NULL || len == 0, NULL);
-
   if (_gtk_builder_enum_from_string (GTK_TYPE_ACCESSIBLE_AUTOCOMPLETE, str, &value, error))
     return gtk_autocomplete_accessible_value_new (value);
 
@@ -406,8 +402,6 @@ gtk_orientation_accessible_value_parse (const char  *str,
 {
   int value;
 
-  g_return_val_if_fail (str == NULL || len == 0, NULL);
-
   if (_gtk_builder_enum_from_string (GTK_TYPE_ORIENTATION, str, &value, error))
     return gtk_orientation_accessible_value_new (value);
 
@@ -466,8 +460,6 @@ gtk_sort_accessible_value_parse (const char  *str,
 {
   int value;
 
-  g_return_val_if_fail (str == NULL || len == 0, NULL);
-
   if (_gtk_builder_enum_from_string (GTK_TYPE_ACCESSIBLE_SORT, str, &value, error))
     return gtk_sort_accessible_value_new (value);